export function simpleHashMixed(arr: (number | string)[]): string {
  let hash = 5381;
  for (let i = 0; i < arr.length; i++) {
    const item = arr[i];
    if (typeof item === 'number') {
      hash = (hash << 5) + hash + item;
    } else if (typeof item === 'string') {
      for (let j = 0; j < item.length; j++) {
        hash = (hash << 5) + hash + item.charCodeAt(j);
      }
    } else {
      // 其他类型可扩展
      hash = (hash << 5) + hash + 0;
    }
    hash = hash & 0xffffffff; // 保证32位
  }
  return hash.toString(36);
}

export function getNowStr() {
  const now = new Date();
  return now.toLocaleString('zh-CN', {
    year: 'numeric',
    month: '2-digit',
    day: '2-digit',
    hour: '2-digit',
    minute: '2-digit',
    second: '2-digit',
  });
}
